3.894 \(\int \sec ^5(c+d x) (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx\)

Optimal. Leaf size=91 \[ \frac {2 a^2 \tan ^7(c+d x)}{7 d}+\frac {2 a^2 \tan ^5(c+d x)}{5 d}+\frac {2 a^2 \sec ^7(c+d x)}{7 d}-\frac {3 a^2 \sec ^5(c+d x)}{5 d}+\frac {a^2 \sec ^3(c+d x)}{3 d} \]

[Out]

1/3*a^2*sec(d*x+c)^3/d-3/5*a^2*sec(d*x+c)^5/d+2/7*a^2*sec(d*x+c)^7/d+2/5*a^2*tan(d*x+c)^5/d+2/7*a^2*tan(d*x+c)
^7/d

________________________________________________________________________________________

Rubi [A]  time = 0.21, antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {2873, 2606, 14, 2607, 270} \[ \frac {2 a^2 \tan ^7(c+d x)}{7 d}+\frac {2 a^2 \tan ^5(c+d x)}{5 d}+\frac {2 a^2 \sec ^7(c+d x)}{7 d}-\frac {3 a^2 \sec ^5(c+d x)}{5 d}+\frac {a^2 \sec ^3(c+d x)}{3 d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^5*(a + a*Sin[c + d*x])^2*Tan[c + d*x]^3,x]

[Out]

(a^2*Sec[c + d*x]^3)/(3*d) - (3*a^2*Sec[c + d*x]^5)/(5*d) + (2*a^2*Sec[c + d*x]^7)/(7*d) + (2*a^2*Tan[c + d*x]
^5)/(5*d) + (2*a^2*Tan[c + d*x]^7)/(7*d)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2873

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Int[ExpandTrig[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x]
 /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]

Rubi steps

\begin {align*} \int \sec ^5(c+d x) (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx &=\int \left (a^2 \sec ^5(c+d x) \tan ^3(c+d x)+2 a^2 \sec ^4(c+d x) \tan ^4(c+d x)+a^2 \sec ^3(c+d x) \tan ^5(c+d x)\right ) \, dx\\ &=a^2 \int \sec ^5(c+d x) \tan ^3(c+d x) \, dx+a^2 \int \sec ^3(c+d x) \tan ^5(c+d x) \, dx+\left (2 a^2\right ) \int \sec ^4(c+d x) \tan ^4(c+d x) \, dx\\ &=\frac {a^2 \operatorname {Subst}\left (\int x^4 \left (-1+x^2\right ) \, dx,x,\sec (c+d x)\right )}{d}+\frac {a^2 \operatorname {Subst}\left (\int x^2 \left (-1+x^2\right )^2 \, dx,x,\sec (c+d x)\right )}{d}+\frac {\left (2 a^2\right ) \operatorname {Subst}\left (\int x^4 \left (1+x^2\right ) \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {a^2 \operatorname {Subst}\left (\int \left (x^2-2 x^4+x^6\right ) \, dx,x,\sec (c+d x)\right )}{d}+\frac {a^2 \operatorname {Subst}\left (\int \left (-x^4+x^6\right ) \, dx,x,\sec (c+d x)\right )}{d}+\frac {\left (2 a^2\right ) \operatorname {Subst}\left (\int \left (x^4+x^6\right ) \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {a^2 \sec ^3(c+d x)}{3 d}-\frac {3 a^2 \sec ^5(c+d x)}{5 d}+\frac {2 a^2 \sec ^7(c+d x)}{7 d}+\frac {2 a^2 \tan ^5(c+d x)}{5 d}+\frac {2 a^2 \tan ^7(c+d x)}{7 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 1.02, size = 139, normalized size = 1.53 \[ -\frac {a^2 \sec ^7(c+d x) \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )^4 (448 \sin (c+d x)-104 \sin (2 (c+d x))-144 \sin (3 (c+d x))-52 \sin (4 (c+d x))+48 \sin (5 (c+d x))+182 \cos (c+d x)+736 \cos (2 (c+d x))+39 \cos (3 (c+d x))-192 \cos (4 (c+d x))-13 \cos (5 (c+d x))-672)}{6720 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^5*(a + a*Sin[c + d*x])^2*Tan[c + d*x]^3,x]

[Out]

-1/6720*(a^2*Sec[c + d*x]^7*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^4*(-672 + 182*Cos[c + d*x] + 736*Cos[2*(c +
d*x)] + 39*Cos[3*(c + d*x)] - 192*Cos[4*(c + d*x)] - 13*Cos[5*(c + d*x)] + 448*Sin[c + d*x] - 104*Sin[2*(c + d
*x)] - 144*Sin[3*(c + d*x)] - 52*Sin[4*(c + d*x)] + 48*Sin[5*(c + d*x)]))/d

________________________________________________________________________________________

fricas [A]  time = 0.44, size = 115, normalized size = 1.26 \[ -\frac {24 \, a^{2} \cos \left (d x + c\right )^{4} - 47 \, a^{2} \cos \left (d x + c\right )^{2} + 25 \, a^{2} - 2 \, {\left (6 \, a^{2} \cos \left (d x + c\right )^{4} - 9 \, a^{2} \cos \left (d x + c\right )^{2} + 5 \, a^{2}\right )} \sin \left (d x + c\right )}{105 \, {\left (d \cos \left (d x + c\right )^{5} + 2 \, d \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) - 2 \, d \cos \left (d x + c\right )^{3}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^8*sin(d*x+c)^3*(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

-1/105*(24*a^2*cos(d*x + c)^4 - 47*a^2*cos(d*x + c)^2 + 25*a^2 - 2*(6*a^2*cos(d*x + c)^4 - 9*a^2*cos(d*x + c)^
2 + 5*a^2)*sin(d*x + c))/(d*cos(d*x + c)^5 + 2*d*cos(d*x + c)^3*sin(d*x + c) - 2*d*cos(d*x + c)^3)

________________________________________________________________________________________

giac [A]  time = 0.24, size = 138, normalized size = 1.52 \[ -\frac {\frac {35 \, {\left (3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{2}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{3}} - \frac {105 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 1015 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 1330 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 1302 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 469 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 67 \, a^{2}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{7}}}{840 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^8*sin(d*x+c)^3*(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

-1/840*(35*(3*a^2*tan(1/2*d*x + 1/2*c) + a^2)/(tan(1/2*d*x + 1/2*c) + 1)^3 - (105*a^2*tan(1/2*d*x + 1/2*c)^5 -
 1015*a^2*tan(1/2*d*x + 1/2*c)^4 + 1330*a^2*tan(1/2*d*x + 1/2*c)^3 - 1302*a^2*tan(1/2*d*x + 1/2*c)^2 + 469*a^2
*tan(1/2*d*x + 1/2*c) - 67*a^2)/(tan(1/2*d*x + 1/2*c) - 1)^7)/d

________________________________________________________________________________________

maple [B]  time = 0.48, size = 248, normalized size = 2.73 \[ \frac {a^{2} \left (\frac {\sin ^{6}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {\sin ^{6}\left (d x +c \right )}{35 \cos \left (d x +c \right )^{5}}-\frac {\sin ^{6}\left (d x +c \right )}{105 \cos \left (d x +c \right )^{3}}+\frac {\sin ^{6}\left (d x +c \right )}{35 \cos \left (d x +c \right )}+\frac {\left (\frac {8}{3}+\sin ^{4}\left (d x +c \right )+\frac {4 \left (\sin ^{2}\left (d x +c \right )\right )}{3}\right ) \cos \left (d x +c \right )}{35}\right )+2 a^{2} \left (\frac {\sin ^{5}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {2 \left (\sin ^{5}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}\right )+a^{2} \left (\frac {\sin ^{4}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {\sin ^{4}\left (d x +c \right )}{35 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{4}\left (d x +c \right )}{35 \cos \left (d x +c \right )}-\frac {\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{35}\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^8*sin(d*x+c)^3*(a+a*sin(d*x+c))^2,x)

[Out]

1/d*(a^2*(1/7*sin(d*x+c)^6/cos(d*x+c)^7+1/35*sin(d*x+c)^6/cos(d*x+c)^5-1/105*sin(d*x+c)^6/cos(d*x+c)^3+1/35*si
n(d*x+c)^6/cos(d*x+c)+1/35*(8/3+sin(d*x+c)^4+4/3*sin(d*x+c)^2)*cos(d*x+c))+2*a^2*(1/7*sin(d*x+c)^5/cos(d*x+c)^
7+2/35*sin(d*x+c)^5/cos(d*x+c)^5)+a^2*(1/7*sin(d*x+c)^4/cos(d*x+c)^7+3/35*sin(d*x+c)^4/cos(d*x+c)^5+1/35*sin(d
*x+c)^4/cos(d*x+c)^3-1/35*sin(d*x+c)^4/cos(d*x+c)-1/35*(2+sin(d*x+c)^2)*cos(d*x+c)))

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 91, normalized size = 1.00 \[ \frac {6 \, {\left (5 \, \tan \left (d x + c\right )^{7} + 7 \, \tan \left (d x + c\right )^{5}\right )} a^{2} + \frac {{\left (35 \, \cos \left (d x + c\right )^{4} - 42 \, \cos \left (d x + c\right )^{2} + 15\right )} a^{2}}{\cos \left (d x + c\right )^{7}} - \frac {3 \, {\left (7 \, \cos \left (d x + c\right )^{2} - 5\right )} a^{2}}{\cos \left (d x + c\right )^{7}}}{105 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^8*sin(d*x+c)^3*(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

1/105*(6*(5*tan(d*x + c)^7 + 7*tan(d*x + c)^5)*a^2 + (35*cos(d*x + c)^4 - 42*cos(d*x + c)^2 + 15)*a^2/cos(d*x
+ c)^7 - 3*(7*cos(d*x + c)^2 - 5)*a^2/cos(d*x + c)^7)/d

________________________________________________________________________________________

mupad [B]  time = 13.52, size = 215, normalized size = 2.36 \[ \frac {4\,a^2\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left ({\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-4\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )+3\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+8\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+91\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-84\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+105\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\right )}{105\,d\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^7\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((sin(c + d*x)^3*(a + a*sin(c + d*x))^2)/cos(c + d*x)^8,x)

[Out]

(4*a^2*cos(c/2 + (d*x)/2)^3*(cos(c/2 + (d*x)/2)^7 + 105*cos(c/2 + (d*x)/2)*sin(c/2 + (d*x)/2)^6 - 4*cos(c/2 +
(d*x)/2)^6*sin(c/2 + (d*x)/2) - 84*cos(c/2 + (d*x)/2)^2*sin(c/2 + (d*x)/2)^5 + 91*cos(c/2 + (d*x)/2)^3*sin(c/2
 + (d*x)/2)^4 + 8*cos(c/2 + (d*x)/2)^4*sin(c/2 + (d*x)/2)^3 + 3*cos(c/2 + (d*x)/2)^5*sin(c/2 + (d*x)/2)^2))/(1
05*d*(cos(c/2 + (d*x)/2) - sin(c/2 + (d*x)/2))^7*(cos(c/2 + (d*x)/2) + sin(c/2 + (d*x)/2))^3)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**8*sin(d*x+c)**3*(a+a*sin(d*x+c))**2,x)

[Out]

Timed out

________________________________________________________________________________________